package tyk.pojo;

import java.awt.*;
import java.util.List;

/***
 *@title Page
 *@description <TODO description class purpose>
 *@author Tang'ya'kang
 *@VERSION 1.0.0
 *@CREATE 2023/5/12 18:56
 **/
public class Page {
    public static Integer PAGE_SIZE=12;
    private Integer pageNo;   //当前页码编号
    private Integer pageTotal;//总共页码数
    private Integer pageSize=PAGE_SIZE;//页码一次性显示图书数量
    private Integer pageTotalCount;//图书总数
    private List<Book> list;//当前页面资源
    private String url;
    public Page() {
    }

    public Page(Integer pageNo, Integer pageTotal, Integer pageTotalCount, List<Book> list) {
        this.pageNo = pageNo;
        this.pageTotal = pageTotal;
        this.pageTotalCount = pageTotalCount;
        this.list = list;
    }

    public Page(Integer pageNo, Integer pageTotal, Integer pageTotalCount, List<Book> list, String url) {
        this.pageNo = pageNo;
        this.pageTotal = pageTotal;
        this.pageTotalCount = pageTotalCount;
        this.list = list;
        this.url = url;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public static Integer getPageSize() {
        return PAGE_SIZE;
    }

    public static void setPageSize(Integer pageSize) {
        PAGE_SIZE = pageSize;
    }

    public Integer getPageTotalCount() {
        return pageTotalCount;
    }

    public void setPageTotalCount(Integer pageTotalCount) {
        this.pageTotalCount = pageTotalCount;
    }

    public List<Book> getList() {
        return list;
    }

    public void setList(List<Book> list) {
        this.list = list;
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(Integer pageTotal) {
        this.pageTotal = pageTotal;
    }

    @Override
    public String toString() {
        return "Page{" +
                "pageNo=" + pageNo +
                ", pageTotal=" + pageTotal +
                ", pageSize=" + pageSize +
                ", pageTotalCount=" + pageTotalCount +
                ", list=" + list +
                '}';
    }
}
